/*
 * test_framework_datastructure_safearray.h
 *
 *  Created on: 2014. 7. 2.
 *      Author: jjaehuny
 */

#ifndef TEST_FRAMEWORK_DATASTRUCTURE_SAFEARRAY_H_
#define TEST_FRAMEWORK_DATASTRUCTURE_SAFEARRAY_H_

#include <gtest/gtest.h>
#include <glog/logging.h>

#include <Framework/DataStructure/SafeArray.h>

class test_framework_datastructure_safearray : public testing::Test
{
public:
	::Framework::DataStructure::SafeArray<int, 1> clsIntSafeArray;

	// Sets up the test fixture.
	virtual void SetUp() {
	}

	// Tears down the test fixture.
	virtual void TearDown() {}
};

TEST_F(test_framework_datastructure_safearray, test_framework_datastructure_safearray_set_true)
{

	bool bSetValueRet = clsIntSafeArray.SetValue(0, 1);
	EXPECT_TRUE(bSetValueRet);
}

TEST_F(test_framework_datastructure_safearray, test_framework_datastructure_safearray_get_true)
{
	int nRetVal = 0;
	bool bGetValueRet = clsIntSafeArray.GetValue(0, nRetVal);
	EXPECT_TRUE(bGetValueRet);
}

TEST_F(test_framework_datastructure_safearray, test_framework_datastructure_safearray_set_false)
{

	bool bSetValueRet = clsIntSafeArray.SetValue(2, 1);
	EXPECT_FALSE(bSetValueRet);
}

TEST_F(test_framework_datastructure_safearray, test_framework_datastructure_safearray_get_false)
{
	int nRetVal = 0;
	bool bGetValueRet = clsIntSafeArray.GetValue(2, nRetVal);
	EXPECT_FALSE(bGetValueRet);
}

#endif /* TEST_FRAMEWORK_DATASTRUCTURE_SAFEARRAY_H_ */
